package com.nosnow.oss;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author by bingHeng
 * @version 1.0
 * @Create 2020/4/3 23:28
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableDiscoveryClient
@ComponentScan(basePackages = {"com.nosnow"})
public class OssApplication {

    /**
     *
     * Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
     * 启动的时候找数据库配置，但是现在模块中因为不需要操作数据库，只是做上传oss功能，没有配置数据库
     *
     * 解决方式：
     * 方式一：在application配置文件中添加上数据库的配置
     * 方式二：在启动类上添加属性，默认不去加载数据库的配置（推荐使用）
     */
    public static void main(String[] args) {
        SpringApplication.run(OssApplication.class, args);
    }
}
